Conversation
…ct reusable crates/afconvert Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
✅ Deploy Preview for hyprnote-storybook canceled.
|
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(fs-sync, mac): add macOS AAC-in-MP4 fallback via afconvert; extract crates/afconvert
Summary
Some MP4 files recorded on macOS (ISOMP4 container with H.264 video + AAC-LC audio) fail to decode via Symphonia (rodio backend) due to AAC validation in their MP4 demuxer/decoder. This PR adds a macOS-only fallback path in
plugins/fs-sync/src/audio.rs:rodio::Decoder::try_from(file)fails on macOS:crates/afconvertto call the systemafconverttool to extract audio to a temporary 16-bit LE WAV.Additionally:
crates/afconvertcrate encapsulates theafconvertinvocation and error handling for reuse elsewhere.hypr-afconvertas a workspace dependency and add it toplugins/fs-sync.Scope of change is tightly limited to the import path; no other audio capture or STT flows are modified. On non-macOS platforms, behavior is unchanged. On macOS, the fallback only triggers if rodio decoding fails.
Changes of interest:
to_wav(&Path) -> Result<PathBuf, Error>.import_audio_from_decoderand add macOS fallback path usinghypr_afconvert::to_wav.AudioProcessingError::AfconvertFailed(String)for clear surfacing of conversion errors.Review & Testing Checklist for Human (3 items)
audio.oggis created and playable; transcription paths still work./tmp(orstd::env::temp_dir()).hypr-afconvertusage only inside#[cfg(target_os = "macos")]block for the fallback call.hypr-afconvertin Cargo.toml, referenced ashypr_afconvertin code).Recommended test plan:
audio.oggis generated.crates/data/src/english_1/*to ensure nothing regresses.cargo test -p tauri-plugin-fs-sync(already passing locally).Notes
afconverttool is part of macOS and the fallback should only be hit when rodio fails. Ifafconvertis unavailable or fails, a clearAfconvertFailederror is returned.Requested by: @yujonglee